/*
** Copyright (C) 2009 Zhang Cong <ftofficer@ftofficer.com>
**  
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**  
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**  
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**  
*/

#ifndef OI_SSH_H
#define OI_SSH_H

#include <liboi.h>

oi_device* oi_ssh_create_device();
void oi_ssh_free_device(oi_device* device);

liboi_err_t oi_ssh_connect(oi_device* device);
liboi_err_t oi_ssh_get_info(oi_device* device, oi_device_info* dev_info);
liboi_err_t oi_ssh_disconnect(oi_device* device);

liboi_err_t oi_ssh_exec_in_device(oi_device* device,
                                  const char* command,
                                  struct data_buffer* stdin_,
                                  int* exit_code,
                                  struct data_buffer* stdout_,
                                  struct data_buffer* stderr_);

liboi_err_t oi_ssh_get_file(oi_device* device,
                            const char* device_file_path,
                            const char* host_file_path);

liboi_err_t oi_ssh_put_file(oi_device* device,
                            const char* host_file_path,
                            const char* device_file_path);

#endif // OI_SSH_H
